package Wix::Tag::Directory;

use parent qw/Wix::Tag/;

sub new() {
	my ($class, $args) = @_;
	
	my $self = Wix::Tag->new({TAG => 'Directory'});
	
	$self->addAttr('Id', $args->{ID});
	$self->addAttr('Name', $args->{NAME});
	
	return bless($self, $class);
}

sub addDirectory($) {
	my ($self, $directory) = @_;

	$self->addElement('Wix::Tag::Directory', $directory);	
}

sub addFile($) {
	my ($self, $file) = @_;

	$self->addElement('Wix::Tag::File', $file);	
}

sub addComponent($) {
	my ($self, $component) = @_;

	$self->addElement('Wix::Tag::Component', $component);	
}

sub GetStartMenu() {
	return Wix::Tag::Directory->new(
		{
			ID => 'ProgramMenuFolder',
			NAME => 'StartMenu'
		}
	);
}

sub GetDesktop() {
	return Wix::Tag::Directory->new(
		{
			ID => 'DesktopFolder',
			NAME => 'Desktop'
		}
	);
}

sub GetProgramFiles() {
	return Wix::Tag::Directory->new(
		{
			ID => 'ProgramFilesFolder',
			NAME => 'PFiles'
		}
	);
}

sub GetTarget() {
	return Wix::Tag::Directory->new(
		{
			ID => 'TARGETDIR',
			NAME => 'SourceDir'
		}
	);
} 

sub GetApplicationRoot($) {
	return Wix::Tag::Directory->new(
		{
			ID => 'APPLICATIONROOTDIRECTORY',
			NAME => shift
		}
	);
}

1;